#!/usr/bin/env python
import pika

credentials = pika.PlainCredentials("liwenbin", "123456")
conn_params = pika.ConnectionParameters("192.168.1.105",5672,credentials = credentials)
connection = pika.BlockingConnection(conn_params)
channel = connection.channel()

channel.queue_declare(queue='hello')

channel.basic_publish(exchange='',
                      routing_key='hello',
                      body='Hello World!')
print(" [x] Sent 'Hello World!'")
connection.close()
